package com.gxar.navigation.server.base.model;

import com.gxar.common.entity.ResultCode;

/**
 * ResultCodeEnum
 *
 * @author Linsy
 * @version 1.0
 * @created 2023/6/20 11:25 AM
 */
public enum ResultCodeEnum implements ResultCode {

    /**
     * 业务错误
     */
    NODE_EXIST(50001, "节点已存在"),
    NODE_NOT_EXIST(50002, "节点不存在"),
    LINE_NOT_EXIST(50003, "路段不存在"),
    LINE_EXIST(50004, "路段已存在"),
    ACTIVE_LINE_NOT_EXIST(50005, "该活动没有可用的路线，请联系服务商创建"),
    ACTIVE_NODE_NOT_EXIST(50005, "该活动没有可用的节点，请联系服务商创建"),
    DIRECTION_NODE_NOT_EXIST(50006, "终点经纬度不在允许范围内，请重新选择"),
    LINE_DISTANCE_MUST_POSITIVE_NUMBER(50007, "线段距离必须大于0"),
    LINE_CALCULATE_DISTANCE_NOT_POSITIVE_NUMBER(50008, "线段计算距离小于0，请检查起止点坐标是否正确"),

    ;


    private final Integer code;
    private final String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getRet() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
